package cn.anecansaitin.industrialization_expansion.common.item;

import cn.anecansaitin.industrialization_expansion.common.TranslationText;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;

import java.util.List;

public class CommonModifiedTool extends ModifiedTool{
    private final TranslationTextComponent name;
    private final int energyRatio;
    private final List<ITextComponent> tips;
    private final String icon;

    public CommonModifiedTool(String name, int energyRatio, List<ITextComponent> tips, String icon) {
        this.name = (TranslationTextComponent) TranslationText.getToolName(name).withStyle(TextFormatting.AQUA);
        this.energyRatio = energyRatio;
        this.tips = tips;
        this.icon = icon;
    }

    @Override
    public TranslationTextComponent getToolName(ItemStack stack) {
        return name;
    }

    @Override
    public int getEnergyRatio(ItemStack stack) {
        return energyRatio;
    }

    @Override
    public List<ITextComponent> getToolTip(ItemStack stack) {
        return tips;
    }

    @Override
    public String getDefaultIcon(ItemStack stack) {
        return icon;
    }
}
